﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="detailsearchproducts.ascx.cs" Inherits="controls_client_detailsearchproducts" %>  
  <script type="text/javascript" language="javascript">
    function catchuoi(str,n)
    {    
         var s=""; 
         var stringSplitArray = str.split(" ");

         var j = 0;
         if(n> stringSplitArray.length)
         {
            s= str;
         }
         else
         {
             for(j = 0; j < n; j++)
             {
               s= s + stringSplitArray[j] + " ";
             }
             s = s+ "...";
         }
         document.write(s);
    }
</script>
  <div class="blog"> 
      <div class="slide-vstech">
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="200" id="Object6" align="middle" >
                <param name="movie" value="download/media/swf/desktop_vsc.swf" />
                <param name="quality" value="high" />
                <param name="allowFullScreen" value="true" />
                <param name="wmode" value="transparent" />
                <param name="allowScriptAccess" value="always" />
                <param name="_flashcreator" value="http://www.photo-flash-maker.com" />
                <param name="_flashhost" value="http://www.go2album.com" />
                <embed src="download/media/swf/desktop_vsc.swf" width="500" height="200" quality="high" allowFullScreen="true" wmode="transparent" allowScriptAccess="always" name="tech" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
            </object>
        </div><br />
<div id="breadcrumb">
    <ol>
        <li class="breacrumbs_home"><a href="index.html">Trang chủ</a></li>
        <li class="last"><asp:Label ID="lbTitle" runat="server" Text="Danh sách sản phẩm"></asp:Label></li>
    </ol> 
    <div style="float:right">
        <img src="images/icon/alarmd.png" style="width:26px; height:26px; position:absolute; margin:-5px 0 0 -30px" />
        <div id="mylabel" style="font-size:17px; font-style:italic; text-shadow: black 0.1em 0.1em 0.2em; "></div>                                                       
    </div>
</div>
           <asp:DataList ID="DataListSanPham" runat="server" RepeatColumns="2" 
                GridLines="None" onitemcommand="DataListSanPham_ItemCommand" DataKeyField="Id">
                                <ItemTemplate>                                    
                                    <!-- Begin information product-->
                                    <div class="slide-vstech">  
                                    <table style="border-style: groove; border-width: thin" width="250px" >
                                        <tr>
                                            <td colspan="2"><b><%#Eval("TenSanPham") %></b></td>
                                        </tr>
                                        <tr>
                                            
                                            <td valign="bottom"><img src="<%# "images/imageproductadd/" + Eval("Hinh") %>" width="110px" height="91px" /></td>
                                            <td><asp:ImageButton ID="pBuy" runat="server" width="80px" height="50px" ImageUrl="~/images/button/buy.png" CommandName="buy"  /></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="color:Red; font-style:italic; font-weight:bold" align="left">Thông tin sản phẩm:</td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <script type="text/javascript" language="javascript"> catchuoi('<%# Eval("TomTatThongTin") %>', 10);</script>
                                                <br />
                                                <a href='<%# "DetailProduct.aspx?key=" + Eval("Id") %>'>Chi tiết...</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" style="color:Red; font-style:italic; font-weight:bold" align="left">Khuyến mãi:</td>
                                        </tr>
                                        <tr>
                                            <td colspan="2">
                                                <%#Eval("KhuyenMai") %>
                                            </td>
                                        </tr>
                                        <tr>
                                            
                                            <td style="text-align:left; color:Red; font-style:italic; font-weight:bold" 
                                                colspan="2">Đơn giá : <%#Eval("DonGia", "{0:#,##0}")%> VNĐ</td>
                                        </tr>
                                    </table>
                                    </div> 
                                    <!-- End information product -->                               
                                </ItemTemplate>
                                </asp:DataList>      
                            
    <center>
        
                <table cellpadding="0" border="0" id="PhanTrang" runat ="server">
                    <tr>
                        <td align="right">
                            <asp:LinkButton ID="lbtnFirst" runat="server" CausesValidation="false" OnClick="lbtnFirst_Click">Trang đầu</asp:LinkButton>&nbsp;
                        </td>
                        <td align="right">
                            <asp:LinkButton ID="lbtnPrevious" runat="server" CausesValidation="false" OnClick="lbtnPrevious_Click">Trang trước</asp:LinkButton>&nbsp;&nbsp;</td>
                        <td align="center" valign="middle">
                            <asp:DataList ID="dlPaging" runat="server" RepeatDirection="Horizontal" OnItemCommand="dlPaging_ItemCommand"
                                OnItemDataBound="dlPaging_ItemDataBound">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkbtnPaging" runat="server" CommandArgument='<%# Eval("PageIndex") %>'
                                        CommandName="Paging" Text='<%# Eval("PageText") %>'></asp:LinkButton>&nbsp;
                                </ItemTemplate>
                            </asp:DataList>
                        </td>
                        <td align="left">&nbsp;&nbsp;
                            <asp:LinkButton ID="lbtnNext" runat="server" CausesValidation="false"
                                OnClick="lbtnNext_Click">Trang tiếp</asp:LinkButton></td>
                        <td align="left">&nbsp;
                            <asp:LinkButton ID="lbtnLast" runat="server" CausesValidation="false" OnClick="lbtnLast_Click">Trang cuối</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" align="center" style="height: 30px" valign="middle">
                            <asp:Label ID="lblPageInfo" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
       
    </center>
      <asp:Label ID="lbReport" runat="server" Text="Dữ liệu đang cập nhật" Visible="false"></asp:Label>           
 </div>
 